<script setup lang="ts">
import { CRUBtnPropsType } from '@renderer/types'

const {
  text = '新增配置',
  btnProps = {},
  collapse = false,
  click = () => {}
} = defineProps<CRUBtnPropsType>()

const iconProps = SIconPropsConst.Plus
</script>

<template>
  <x-collapse-btn
    :icon-props="iconProps"
    :text="text"
    :btn-props="{
      type: 'primary',
      ...btnProps
    }"
    :collapse="collapse"
    :click="
      (evt) => {
        evt.stopPropagation()
        click()
      }
    "
  />
</template>

<style scoped lang="scss"></style>
